home *** CD-ROM | disk | FTP | other *** search
/ Enciclopedia Del Perro / Enciclopedia Del Perro.iso / info31 / simple1.sc_ / simple1.sc
Text File  |  1994-05-30  |  3KB  |  75 lines

  1. <******************************************************* language=slang
  2.  
  3. Sample SLANG Modem Dialup Script
  4.  
  5. Description:
  6.  
  7.     Simple Example #1 -- Written in the SLANG scripting language
  8.  
  9.     This script dials the modem, enters a user-id after a short
  10.     delay, then a password after another short delay.  Lastly,
  11.     packet mode is enabled so enable TCP/IP data transfers.
  12.  
  13. To Use This Script:
  14.  
  15.     Change "0000" to the phone number of the remote machine you
  16.     would like to connect to.
  17.  
  18.     Change "my-user-id" to your user id on the remote machine.
  19.  
  20.     Change "my-password" to your password on the remote machine.
  21.  
  22.     Adjust the intervals in the (pause,...) functions to suit
  23.     your needs.  These are in milliseconds (5000 milliseconds ==
  24.     5 seconds).
  25.  
  26.     This script assumes that your modem, and the remote host,
  27.     terminate commands with an ASCII Carrage-Return character.
  28.     If, instead, a Carrage-Return/Line-Feed (CRLF) is required,
  29.     change "(cr)" to "(cr)(lf)" everywhere in the script it is
  30.     necessary.
  31.  
  32. Notes:
  33.  
  34.     This is a very simple dial script.  It assumes that:
  35.  
  36.     o    the modem connection will always be made
  37.  
  38.     o    the remote machine will always be ready for your
  39.         user-id after a set interval
  40.  
  41.     o    like-wise for your password
  42.  
  43.     In short, this script closely parallels scripts written in
  44.     FTP's first dialing script language, COMSCRPT.  It is
  45.     optimistic and makes no provisions for errors.  More complex
  46.     examples provided demonstrate error handling, and many other
  47.     options using features of SLANG.
  48.  
  49. Built-In SLANG Functions Used:
  50.  
  51.     send        Send a character string to the modem.
  52.     cr        Return a Carriage-Return character.
  53.     pause        Wait a specified number of milliseconds.
  54.     changemode    Changes mode of connection from "raw" to
  55.             "packet".
  56.  
  57. ************************************************************************>
  58.  
  59. (send,                <* Dial the remote modem/host        *>
  60.     {ATDT0000}        <*    Modem command and phone number    *>
  61.     (cr)            <*    Carrage-Return after modem cmd    *>
  62. )                <*    End of "send" function        *>
  63. (pause, 25000)            <* Wait for the modem to connect    *>
  64. (send,                <* Log-in to the remote modem/host    *>
  65.     {my-user-id}        <*    Send your user id        *>
  66.     (cr)            <*    Carrage-Return after user id    *>
  67. )                <*    End of "send" function        *>
  68. (pause, 5000)            <* Wait for a password prompt        *>
  69. (send,                <* Send your password            *>
  70.     {my-password}           <*    Your actual password        *>
  71.     (cr)            <*    Carrage-Return after password    *>
  72. )                <*    End of "send" function        *>
  73. (pause, 5000)            <* Pause for a moment            *>
  74. (changemode, packet)        <* Change to "packet" mode        *>
  75.